<!DOCTYPE html ><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>TSM - Registro</title>
</head>
<script src="ajax/ajax.js" type="text/javascript"></script>
<script type="text/javascript">

    function enviarDatos() {
        var name = document.getElementById('nombre').value;
        var last = document.getElementById('apellido').value;
        var user = document.getElementById('user').value;
        var pass1 = document.getElementById('pass1').value;
        var pass2 = document.getElementById('pass2').value;
        var email = document.getElementById('email').value;
        var lider = document.getElementById('lider').value;
        if (pass1 !== pass2) {
            alert("Las contraseñas no coinciden");
            document.getElementById('pass1').value = "";
            document.getElementById('pass2').value = "";
            return;
        }
        datos = "user=" + user + "&name=" + name + "&last=" + last + "&pass=" + pass1 + "&email=" + email + "&lider=" + lider;
        alert(datos);

        tiempo(datos, "registroDAO.php");
    }


</script>
<style>
    nav {
        left : 0;
        width : 100%;
        background : url(imagenes/imagen_nav.png);
    }
    nav ul {
        margin : 0 auto;
        width : 940px;
        list-style : none;
    }
    nav ul li {
        float : left;
    }
    nav ul li a {
        display : block;
        margin-right : 20px;
        width : 140px;
        font-size : 14px;
        line-height : 44px;
        text-align : center;
        text-decoration : none;
        color : #ccc;
    }
    nav ul li a:hover {
        color : #fff;
    }
    nav ul li.selected a {
        color : #fff;
    }
    input {
        border-radius: 20px;
        text-align : center;
    }

</style>

<body>
    <div style="float:left; width:100%; background-color: rgb(242, 173, 0);">
        <div style="float:left; width:15%">
            <div id="imagenes/logo_udc.png" sty><img src="logo_udc.png" width="142" height="107"></div>
        </div>

        <div style="float:left; width:85%; font-size:30pt; font-weight:bold; padding-top:35px;">TSM Team Support Manager</div>
    </div>

    <div style="float:left; background : url(imagenes/imagen_nav.png); width:100%;"><nav>
            <ul class="sf-menu" id="nav">
                <li class="selected"><a href="index.php">Inicio</a></li>
                <li><a href="about.html">&iquest;Quienes somos?</a></li>

                <li><a href="#">TSM</a>

                </li>
                <li><a href="registro.php">Registrarse</a></li>
            </ul>
        </nav></div>


    <div id="bodycuerpo" style="width:100%; float:left; height:600px; background-color: rgb(228, 101, 0);">

        <div style="float:left; width:90%; height: 80%; margin-left:5%;margin-top: 20px; margin-bottom: 4%; text-align:center; background-color: #151515; font-weight:bold; color:white;">
            <div>
                <div style="background : url(imagenes/imagen_nav.png);">
                    Registro
                </div>
                <div STYLE=" text-align:LEFT; padding:20px;">
                    <form id="login" action="POST" style=" text-align: center;">
                        Nombre:<br />
                        <input style="width:30%;" type="text" id="nombre" name="nombre" autofocus required />
                        <br />
                        Apellido:<br />
                        <input style="width:30%;" type="text" id="apellido" name="apellido" required />
                        <br />
                        usuario:<br />
                        <input style="width:30%;" type="text" id="user" name="user" required />
                        <br />
                        Contrase&ntildea:<br />
                        <input style="width:30%;" type="password" id="pass1" name="pass1" required />
                        <br />
                        Repetir contrase&ntildea:<br />
                        <input style="width:30%;" type="password" id="pass2" name="pass2" required />
                        <br />
                        Email:<br />
                        <input style="width:30%;" type="email" id="email" name="email" required />
                        <br />
                        Rol:<br />
                        <select id="lider" name="lider" required >
                            <option>Lider de Desarrollo</option>
                        </select>
                        <br />
                        <p style="width:100%; text-align:center;">
                            <input type="button" value="Submit" onClick="enviarDatos();" />
                        </p>
                        <div id="mes"></div>
                    </form>

                </div>
            </div>

        </div>
    </div>

    <div id="footer" style="float:left;background : url(imagenes/imagen_nav.png); width:100%; font-size : 14px;
         line-height : 44px;
         text-align : center;
         text-decoration : none;
         color : #ccc;">Jonathan Lozano-Ling Lung-Harold Solorzano</div>

</body>
</html>